<#include "common/main.html">
<#macro bodyId>statistics-agent</#macro>
<#macro content>


<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main ty-common-page">
    <h1 class="page-header">员工排行榜
<!--         <div class="btns"> -->
<!--             <a class="btn btn-success" href="${rc.contextPath}/loan/add">新增申贷</a> -->
<!--         </div> -->
    </h1>
    <div class="tool-bar">
        <div class="filter">
            <form action="" method="get" class="J_filterForm" id="statistics-form">
                <div class="form-group">
                    <div class="col-sm-11">
<!--                         <div class="col7"> -->
<!--                             <span class="label-text">省：</span> -->
<!--                             <select class="form-control" name="provinceId"> -->
<!--                             	   <option value="" <#if queryDto.provinceId==null>selected="true"</#if>>全部</option> -->
<!-- 			                    <#list provinceList as province> -->
<!-- 			                    <option value="${province.id}" <#if province.id=queryDto.provinceId>selected="true"</#if>>${province.name}</option> -->
<!-- 			                    </#list> -->
<!--                             </select> -->
<!--                         </div> -->
<!--                         <div class="col7"> -->
<!--                             <span class="label-text">市：</span> -->
<!--                             <select class="form-control" name="cityId"> -->
<!--                             	   <option value="" <#if queryDto.cityId==null>selected="true"</#if>></option> -->
<!-- 			                    <#list cityList as city> -->
<!-- 			                    <option value="${city.id}" <#if city.id=queryDto.cityId>selected="true"</#if>>${city.name}</option> -->
<!-- 			                    </#list> -->
<!--                             </select> -->
<!--                         </div> -->
<!--                         <div class="col7"> -->
<!--                             <span class="label-text">区县：</span> -->
<!--                             <select class="form-control" name="regionId"> -->
<!--                             	   <option value="" <#if queryDto.regionId==null>selected="true"</#if>></option> -->
<!-- 			                    <#list regionList as region> -->
<!-- 			                    <option value="${region.id}" <#if region.id=queryDto.regionId>selected="true"</#if>>${region.name}</option> -->
<!-- 			                    </#list> -->
<!--                             </select> -->
<!--                         </div> -->
                        
                        <div class="col4">
                            <span class="label-text">姓名：</span>
                            <input class="form-control" name="managerName" value="${queryDto.managerName}"/>
                        </div>
                        <div class="col4">
                            <span class="label-text">注册手机号：</span>
                            <input class="form-control" name="phoneNumber" value="${queryDto.phoneNumber}"/>
                        </div>
                        <div class="col4">
                            <span class="label-text">所属支行：</span>
                            <select class="form-control" name="subBankCode">
                                   <option value="" <#if queryDto.subBankCode==null>selected="true"</#if>>全部</option>
                                <#list bankList as bank>
                                <option value="${bank.code}" <#if bank.code==queryDto.subBankCode>selected="true"</#if>>${bank.name}</option>
                                </#list>
                            </select>
                        </div>
                        <div class="col4">
                            <span class="label-text">年份：</span>
                            <select class="form-control" name="year">
                            	   <option value="" <#if queryDto.year==null>selected="true"</#if>>全部</option>
                            	   <option value="2018" <#if queryDto.year=='2018'>selected="true"</#if>>2018年</option>
                            	   <option value="2019" <#if queryDto.year=='2019'>selected="true"</#if>>2019年</option>
                            	   <option value="2020" <#if queryDto.year=='2020'>selected="true"</#if>>2020年</option>
                            	   <option value="2021" <#if queryDto.year=='2021'>selected="true"</#if>>2021年</option>
                            	   <option value="2022" <#if queryDto.year=='2022'>selected="true"</#if>>2022年</option>
                            	   <option value="2023" <#if queryDto.year=='2023'>selected="true"</#if>>2023年</option>
                            </select>
                        </div>
                        <div class="col4">
                            <span class="label-text">月份：</span>
                            <select class="form-control" name="month">
                                   <option value="" <#if queryDto.month==null>selected="true"</#if>>全部</option>
                                   <option value="1" <#if queryDto.month=='1'>selected="true"</#if>>1月</option>
                                   <option value="2" <#if queryDto.month=='2'>selected="true"</#if>>2月</option>
                                   <option value="3" <#if queryDto.month=='3'>selected="true"</#if>>3月</option>
                                   <option value="4" <#if queryDto.month=='4'>selected="true"</#if>>4月</option>
                                   <option value="5" <#if queryDto.month=='5'>selected="true"</#if>>5月</option>
                                   <option value="6" <#if queryDto.month=='6'>selected="true"</#if>>6月</option>
                                   <option value="7" <#if queryDto.month=='7'>selected="true"</#if>>7月</option>
                                   <option value="8" <#if queryDto.month=='8'>selected="true"</#if>>8月</option>
                                   <option value="9" <#if queryDto.month=='9'>selected="true"</#if>>9月</option>
                                   <option value="10" <#if queryDto.month=='10'>selected="true"</#if>>10月</option>
                                   <option value="11" <#if queryDto.month=='11'>selected="true"</#if>>11月</option>
                                   <option value="12" <#if queryDto.month=='12'>selected="true"</#if>>12月</option>
                            </select>
                        </div>
                        <#if systemTitle?index_of("荆门")!=-1>
                        <div class="col4">
                            <span class="label-text">所属法人行：</span>
                            <select class="form-control" name="corpBankCode">
                                   <option value="" <#if queryDto.corpBankCode==null>selected="true"</#if>>全部</option>
                                <#list corpBankList as bank>
                                <option value="${bank.code}" <#if bank.code==queryDto.corpBankCode>selected="true"</#if>>${bank.name}</option>
                                </#list>
                            </select>
                        </div>
                        
                        <div class="col4">
                            <span class="label-text">员工类型：</span>
                            <select class="form-control" name="innerType">
                                   <option value="" <#if queryDto.innerType==null>selected="true"</#if>>全部</option>
                                   <option value="1" <#if queryDto.innerType==1>selected="true"</#if>>机关干部</option>
                                   <option value="2" <#if queryDto.innerType==2>selected="true"</#if>>渠道经理</option>
                                   <option value="3" <#if queryDto.innerType==3>selected="true"</#if>>内部员工</option>
                            </select>
                        </div>
                        
                        </#if>
                       
                        <button type="submit" class="btn btn-success J_getExcel" data-action="${rc.contextPath}/statistic/managerExport">导出Excel</button>
                        <button type="submit" class="btn btn-success J_search" data-action="${rc.contextPath}/statistic/managerList">查询</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="table-responsive">
        <table class="table ac-table table-hover">
            <thead>
            <tr>
                <th>用户ID</th>
                <th>姓名</th>
                <th>注册手机号</th>
                <th>所属支行</th>
                <th>点赞用户量</th>
                <th>注册用户量</th>
                <th>申贷量</th>
                <#if systemTitle?index_of("荆门")!=-1>
<!-- 	                <th>所属法人行</th> -->
	                <th>员工类型</th>
                </#if>
<!--                 <th class="operate1">操作</th> -->
            </tr>
            </thead>
            <tbody>
            <#list statisticMonthlyDtoList as dto>
            <tr>
                <td>${dto.userId}</td>
                <td>${dto.managerName}</td>
                <td>${dto.phoneNumber}</td>
                <td>${dto.bankName}</td>
                <td>${dto.partnerNum}</td>
                <td>${dto.accountNum}</td>
                <td>${dto.loanNum}</td>
                
                <#if systemTitle?index_of("荆门")!=-1>
<!--                     <td>${dto.corpBankName}</td> -->
	                <td>
	                    <#if dto.innerType==1>机关干部</#if>
	                    <#if dto.innerType==2>渠道经理</#if>
                        <#if dto.innerType==3>内部员工</#if>
	                </td>
                </#if>
                
                
<!--                 <td class="operation"> -->
<!--                    <div class="dropdown"> -->
<!--                        <a class="J_edit" href="/loan/edit?id=${loan.id}">修改</a> -->
<!--                    </div> -->
<!--                 </td> -->
            </tr>
            </#list>
            </tbody>
        </table>
    </div>
    <#include "common/page.html">
</div>

<script>
    var config = {

    }
</script>

</#macro>

<script>
// 	$("[name='provinceId']").change(function () {
// 		$me = $(this);
// 		$me.parents("form").find("[name='cityId']").val("");
// 		$me.parents("form").find("[name='regionId']").val("");
// 		$me.parents("form").submit();
// 	});

// 	$("[name='cityId']").change(function () {
// 		$me = $(this);
// 		$me.parents("form").find("[name='regionId']").val("");
// 		$me.parents("form").submit();
// 	});

// 	$("[name='regionId']").change(function () {
// 		$me = $(this);
// 		$me.parents("form").submit();
// 	});
</script>